package com.project.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 商品订单详情
 * @author 
 */
@Data
@TableName(value = "cms_order_detail")
@Table(name = "cms_order_detail", comment = "商品订单详情")
public class CmsOrderDetail implements Serializable {
    /**
     * 商品订单详情ID
     */
    @TableId
    @Column(type= MySqlTypeConstant.BIGINT, comment = "商品订单详情ID", length = 11, isKey = true, isAutoIncrement = true,isNull = false)
    private Long productOrderDetailId;

    /**
     * 订单ID
     */
    @Column(comment = "订单ID")
    private Long productOrderId;

    /**
     * 商品ID
     */
    @Column(comment = "商品ID")
    private Long productId;

    /**
     * 商品备份ID
     */
    @Column(comment = "商品备份ID")
    private Long productBakId;

    /**
     * 商品SKUID
     */
    @Column(comment = "商品SKUID")
    private Long skuId;

    /**
     * 购买数量
     */
    @Column(comment = "购买数量")
    private Integer buyNumber;

    /**
     * 商品单价
     */
    @Column(comment = "商品单价", defaultValue = "0.00", type = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    private BigDecimal unitPrice;

    /**
     * 订单金额
     */
    @Column(comment = "订单金额", defaultValue = "0.00", type = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    private BigDecimal totalPrice;

    private static final long serialVersionUID = 1L;

}